<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title>添加游戏战绩</title>
	<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<link rel="stylesheet" type="text/css" th:href="@{/static/common/layui/css/layui.css}" media="all">
	<link rel="stylesheet" type="text/css" th:href="@{/static/common/bootstrap/css/bootstrap.css}" media="all">
	<link rel="stylesheet" type="text/css" th:href="@{/static/common/global.css}" media="all">
	<link rel="stylesheet" type="text/css" th:href="@{/static/css/personal.css}" media="all">
	<style>
		#container {width:500px; height: 380px; }
	</style>
</head>
<body>
<section class="layui-larry-box">
	<div class="larry-personal">
		<header class="larry-personal-tit">
			<span>添加游戏战绩</span>
		</header><!-- /header -->
		<div class="larry-personal-body clearfix">
			<form class="layui-form col-lg-5" action="/mapmanagement/map/officeBuild/save" method="post">
				<div class="layui-form-item">

					<div class="layui-form-item">
						<label class="layui-form-label">选择游戏角色</label>
						<div class="layui-input-block">
							<select id="roleId" name="roleId" lay-filter="aihao">
								<option th:each="item,stat : ${roleList}" th:value="${item.id}" th:text="${item.roleName}"></option>
							</select>
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">选择游戏模式</label>
						<div class="layui-input-block">
							<select id="game_model" name="gameModel" lay-filter="aihao">
								<option  value="0" >匹配模式</option>
								<option  value="1" >排位模式</option>
							</select>
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">选择游戏英雄</label>
						<div class="layui-input-block">
							<select id="gameHeroes" name="heroId" lay-filter="aihao">
								<option th:each="item,stat : ${gameHeroes}" th:value="${item.id}" th:text="${item.heroName}"></option>
							</select>
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">胜 负</label>
						<div class="layui-input-block">
							<input type="radio" name="gaemResult" value="0" title="胜利" checked="">
							<input type="radio" name="gaemResult" value="1" title="失败">
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">游戏等级</label>
						<div class="layui-input-block">
							<input type="text" lay-verify="required" id="gameLevel" placeholder="请输入" name="gameLevel" autocomplete="off" class="layui-input">
						</div>
					</div>


					<div class="layui-form-item">
						<label class="layui-form-label">个人击杀</label>
						<div class="layui-input-block">
							<input type="text" lay-verify="required" id="killCount" placeholder="请输入" name="killCount" autocomplete="off" class="layui-input">
						</div>
					</div>





					<div class="layui-form-item">
						<label class="layui-form-label">个人助攻</label>
						<div class="layui-input-block">
							<input type="text" lay-verify="required" id="assistCount" placeholder="请输入" name="assistCount" autocomplete="off" class="layui-input">
						</div>
					</div>




					<div class="layui-form-item">
						<label class="layui-form-label">个人死亡</label>
						<div class="layui-input-block">
							<input type="text" lay-verify="required" id="deathCount" placeholder="请输入" name="deathCount" autocomplete="off" class="layui-input">
						</div>
					</div>



					<div class="layui-inline">
						<label class="layui-form-label">游戏开始时间</label>
						<div class="layui-input-inline">
							<input type="text" class="layui-input" id="gameStartTime" th:value="${gameStartTime}" name="gameStartTime" placeholder="yyyy-MM-dd HH:mm:ss">
						</div>
					</div>

					<div class="layui-inline">
						<label class="layui-form-label">游戏结束时间</label>
						<div class="layui-input-inline">
							<input type="text" class="layui-input" id="gameEndTime" name="gameEndTime" placeholder="yyyy-MM-dd HH:mm:ss">
						</div>
					</div>

					<div class="layui-inline">

						<label class="layui-form-label">团队击杀</label>
						<div class="layui-input-block">
							<input type="text" lay-verify="required" id="totalKillCount" placeholder="请输入" name="totalKillCount" autocomplete="off" class="layui-input">
						</div>
					</div>


					<div class="layui-inline">

						<label class="layui-form-label">团队助攻</label>
						<div class="layui-input-block">
							<input type="text" lay-verify="required" id="totalAssistCount" placeholder="请输入" name="totalAssistCount" autocomplete="off" class="layui-input">
						</div>
					</div>


					<div class="layui-inline">
						<label class="layui-form-label">团队死亡</label>
						<div class="layui-input-block">
							<input type="text" lay-verify="required" id="totalDeathCount" placeholder="请输入" name="totalDeathCount" autocomplete="off" class="layui-input">
						</div>
					</div>


					<div class="layui-inline">

						<label class="layui-form-label">团队经济</label>
						<div class="layui-input-block">
							<input type="text" lay-verify="required" id="money" placeholder="请输入" name="money" autocomplete="off" class="layui-input">
						</div>
					</div>

					<div class="layui-inline">
						<label class="layui-form-label">推塔数</label>
						<div class="layui-input-block">
							<input type="text" lay-verify="required" id="pushTower" placeholder="请输入" name="pushTower" autocomplete="off" class="layui-input">
						</div>
					</div>

					<div class="layui-inline">
						<label class="layui-form-label">小龙数</label>
						<div class="layui-input-block">
							<input type="text" lay-verify="required" id="xiaoLongCount" placeholder="请输入" name="xiaoLongCount" autocomplete="off" class="layui-input">
						</div>
					</div>

					<div class="layui-inline">
						<label class="layui-form-label">大龙数</label>
						<div class="layui-input-block">
							<input type="text" lay-verify="required" id="daLongCount" placeholder="请输入" name="daLongCount" autocomplete="off" class="layui-input">
						</div>
					</div>

				</div>

				<div id="submit_btn_div" class="layui-form-item">
					<div class="layui-input-block">
						<button id="submit_btn" type="submit" class="layui-btn">立即提交</button>
						<button id="clear_btn" type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>

			</form>
		</div>
	</div>
</section>
<script type="text/javascript" th:src="@{/static/js/jquery-1.9.1.min.js}"></script>
<script type="text/javascript" th:src="@{/static/common/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/static/js/gdmap.js}"></script>
<!--<script src="https://webapi.amap.com/maps?v=1.4.15&key=234f864ce0d2ff95e8ebaf21a384d913&callback=init"></script>-->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=KV5BZ-M7HCX-ALZ45-7QARP-4W6XH-SFFAO"></script>
<script type="text/javascript">
	layui.use(['form','upload','layedit','jquery','layer','laydate'],function(){
        var $ = layui.$;
        var layer = layui.layer;
		var laydate = layui.laydate;



        //建立编辑器
		 layui.upload({
			 accept: 'images',
			 acceptMime: 'image/*',
			 url: '/mapmanagement/map/officeBuild/file/upload' ,//上传接口
			 before:function(inputObj){
				var size = inputObj.files[0].size;
				if (size > (1*1024*1024)){
				    layer.msg('图片大小不得超过1M',{icon:2});
				    return;
				}
				if (size == 0){
                    layer.msg('图片大小不得为空',{icon:2});
                    return;
				}
			 },
			 success: function(res){
			  //上传成功后的回调
			  if (res.code == 500){
                  layer.alert(res.msg,function(){
                      layer.close(layer.index);
                  })
			  }else {
                  $("#image_upload").attr("src",res.data.src);
                  $("#image_upload").css("width","300px");
                  $("#image_upload").css("height","200px");
			  }
			}
		 });

        // $("#submit_btn").on("click",function () {
		//
        //     //提交按钮
        //     var officeBuildName = $("#office_name").val();
        //     var imageFile = $("#image_upload").attr("src");
        //     var detiledDescription = $("#detiled_description").val();
        //     var anchor = $("#anchor").val();
        //     var collageId = $("#collageId").val();
        //     $.ajax({
        //         url:"/mapmanagement/map/officeBuild/save",
        //         data:{
        //             'officeBuildName': officeBuildName,
		// 			'imageFile':imageFile,
		// 			'detiledDescription':detiledDescription,
		// 			'anchor':anchor,
		// 			'collageId':collageId
        //         },
        //         method:'post',
        //         dataType:'json',
        //         traditional:true,
        //         success: function (data) {
        //             console.log(data);
        //             if (data.code == 500){
        //                 layer.alert(data.msg, function () {
        //                     layer.close(layer.index);
        //                 });
		// 			} else {
        //                 layer.alert(data.msg, function () {
        //                     layer.close(layer.index);
        //                     window.location.reload();
        //                 });
		// 			}
        //         },
        //         error:function () {
        //             layer.alert("办公楼信息上传失败", function () {
        //                 layer.close(layer.index);
        //             });
        //         }
        //     })
        // });
	});





</script>
</body>
</html>